<template>
<div>
  <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      router
  >
    <el-menu-item index="/personInfo">账户信息</el-menu-item>
    <el-menu-item index="/passwordProtection">密码保护</el-menu-item>
    <el-menu-item index="/changeName">修改账户名</el-menu-item>
    <el-menu-item index="/changePassword">修改密码</el-menu-item>
  </el-menu>
  <router-view />
</div>
</template>

<script>
let userJson = sessionStorage.getItem("user");
console.log(userJson)
export default {
  name: "PersonalHomePage",
  data() {
    return {
      activeIndex:'/personInfo',
      userInfo: {
        id:'',
        username:'',
        avatar:''
      }
    }
  },
  created() {
    let userJson = sessionStorage.getItem("user");
    console.log(userJson);
  }
}
</script>

<style scoped>
</style>